package org.candan.spider.task.spider;

import org.candan.spider.bean.Plan;
import org.candan.spider.task.spider.ftp.FtpDownload;

public class SpiderFactory {

	public static SpiderPlan getDownTask(Plan plan){
		SpiderPlan sp = null;
		String head=plan.getUrl().split(":")[0];
		if(head.equals("ftp")){
			sp= new FtpDownload(plan);
		}else if(head.equals("http")){
			sp= new HttpDownload(plan);
		}
		return sp;
	}
}
